* {
    margin: 0;
    padding: 0;
}
.scroll {
    width: 400px;
    height: 8px;
    background-color: #ccc;
    margin: 100px;
    position: relative;
    left: 0px;
    top: 0px;
}
.scroll .bar {
    width: 10px;
    height: 22px;
    background-color: #369;
    position: absolute;
    left: 0;
    top: -7px;
    cursor: pointer;
}
.scroll .mask {
    width: 0;
    height: 100%;
    background-color: #369;
    left: 0;
    top: 0;
}
#demo {
    margin: 100px;
    font-size: 25px;
}